package com.cloud.drore.eboss.operation.controller;

import com.cloud.drore.eboos.common.base.PagePo;
import com.cloud.drore.eboos.common.base.ResultMessage;
import com.cloud.drore.eboos.common.entity.dealer.DistributorProductQueryPo;
import com.cloud.drore.eboos.common.entity.dealer.DistributorProductQueryVo;
import com.cloud.drore.eboos.exception.BusinessException;
import com.cloud.drore.eboss.login.user.Anon;
import com.cloud.drore.eboss.operation.service.ICooperationProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 浙江卓锐科技股份有限公司 版权所有  Copyright 2018<br>
 *
 * @Description: <br>
 * @Project: eboos <br>
 * @CreateDate: Created in 2018/3/18 14:14 <br>
 * @Author: <a href="1451173193@qq.com">杨亮</a>
 */
@RequestMapping("/distributorProductManagerment")
@Api(value = "/分销商_产品管理", description = "分销商_产品管理_杨亮")
@RestController
@Anon
public class DistributorProductManagermentController {
    @Autowired  private ICooperationProductService cooperationProductService;
    @ApiOperation(value = "分页查询组合产品信息")
    @PostMapping(value = "/findCombinationProductByParam")
    public ResultMessage<List<DistributorProductQueryVo>> findCombinationProductByParam(@RequestBody PagePo<DistributorProductQueryPo> pagePo) throws BusinessException {

        return cooperationProductService.findCombinationProductByParam(pagePo);
    }

    @ApiOperation(value = "分页查询门票产品信息")
    @PostMapping(value = "/findTicketProductByParam")
    public ResultMessage< List<DistributorProductQueryVo>> findTicketProductByParam(@RequestBody PagePo<DistributorProductQueryPo> pagePo) throws BusinessException {

        return cooperationProductService.findTicketProductByParam(pagePo);
    }
}
